// Copyright DustedPixels.com 2008. All rights reserved.

package com.dustedpixels.dcel.parser;

import org.objectweb.asm.ClassVisitor;
import org.objectweb.asm.MethodVisitor;

/**
 * @author micapolos@gmail.com (Michal Pociecha-Los)
 */
public interface UnitCodeGenerator {
  void generateFields(ClassVisitor classVisitor, Context context);
  void generateCode(MethodVisitor methodVisitor, Context context);
  void generateInitCode(MethodVisitor methodVisitor, Context context);
  
  interface Context {
    int pinVar(String pinName);
    int fieldVar(String fieldName);
    int getInitArg(int index);
    String newFieldName(String fieldName);
  }
}
